package com.health.yb.web.bean.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * 临床检查主表
 *
 * @author rjwang
 * @version 1.0
 * @date: 2019-12-15 15:57:26
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "用户领取物品添加")
public class YbUserAddReq implements Serializable {


    private static final long serialVersionUID = -3065475578876727503L;

    @ApiModelProperty("领取时间")
    @NotNull(message = "领取时间必选")
    @JsonFormat(pattern="yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String needDate;

    @ApiModelProperty("用户id")
    @NotNull(message = "用户不能为空")
    private Long userId;

    @ApiModelProperty("用户领取物品")
    @NotEmpty(message = "领取物品不能为空")
    @Valid
    private List<YbUserReq> userTypes;



}
